{
    title:  'Starting and Stopping',
    crumbs: [
        { 'Getting Started': '../start/' },
        { 'Installing': 'installing.html' },
    ],
}
            <h1>Starting and Stopping Appweb (Manually)</h1>
            <p>After installation, Appweb is started automatically as a system service or daemon. You can change this
            behavior and start Appweb manually if you wish.</p>
            <p>This page gives information about starting and stopping Appweb manually. Before you can run Appweb
            manually, you must first stop it running as a system service. See <a href="service.html">Running as a
            service</a> for how to stop Appweb running as a system service.</p><a id="programs"></a>
            <a id="commandLine"></a>
            <h2>Appweb Command Line</h2>
            <p>The Appweb command line options are:</p>
            <pre class="ui code segment">
appweb [options]
</pre><a id="appwebOptions"></a>
            <h2>Appweb Command Options</h2>
            <table title="options" class="ui table segment">
                <thead>
                    <tr>
                        <th class="three wide">Option</th>
                        <th>Description</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>--config filename</td>
                        <td>Specify an alternative configuration file instead of appweb.conf.</td>
                    </tr>
                    <tr>
                        <td class="nowrap">--chroot directory</td>
                        <td>Change the system root directory for Appweb. This creates a chroot jail so that the Appweb
                        process cannot access any files outside the given directory.</td>
                    </tr>
                    <tr>
                        <td>--debugger</td>
                        <td>Disable timeouts to make it easier to debug.</td>
                    </tr>
                    <tr>
                        <td>--log logSpec</td>
                        <td>Specify a file to log messages. This will override the ErrorLog directive in the
                        configuration file. The logSpec syntax is logName[:logLevel][.maxSize]. When the maximum size
                        is exceeded, the log file will be rotated to logName.old and a new log file will be started.
                        The log level is a number between 0 and 9 where 0 is the least verbose. The -l option is an
                        alias for --log.</td>
                    </tr>
                    <tr>
                        <td>--home directory</td>
                        <td>Specify the starting directory for the root of the server. This directory contains the Appweb
                        configuration file.</td>
                    </tr>
                    <tr>
                        <td class="nowrap">--name uniqueName</td>
                        <td>Set the program name. Useful to have unique command line names for multiple appweb
                            instances.</td>
                    </tr>
                    <tr>
                        <td>--threads</td>
                        <td>Specify the number of threads to allocate for the appweb thread pool. This overrides the
                        threads configuration file directive.</td>
                    </tr>
                    <tr>
                        <td>--verbose</td>
                        <td>Shorthand for --log stderr:2. The -v option is an alias for --verbose.</td>
                    </tr>
                    <tr>
                        <td>--version</td>
                        <td>Display the appweb version number</td>
                    </tr>
                </tbody>
            </table><a id="noconfig"></a>
            <h2>No Config File</h2>
            <p>Appweb normally reads the "appweb.conf" file for configuration directives. However, if appweb is invoked
            with an IP address or port number on the command line, Appweb will not read the configuration file. Rather, 
            it will listen for requests on the specified IP:PORT address. Usage:</p>
            <pre class="ui code segment">
appweb [IP]:[PORT] [documents]
</pre>For example:
            <pre class="ui code segment">
appweb localhost
</pre>If the PORT component is omitted, Appweb will listen on port 80. If the IP address is omitted and a port is
supplied, Appweb will listen on all network interfaces. An optional document root directory can be supplied for the location 
of the web pages.
            <p>When Appweb is run without a configuration file, it performs minimal configuration. 
             This configuration cannot be altered. If you need a different setup, use a
            configuration file.</p>
            <ul>
                <li>Load the auth filter and the cgi, ejs and file handlers.</li>
                <li>Load and configure the net and send connectors.</li>
                <li>Create a /cgi-bin/ location block set to the cgi-bin directory in the server root.</li>
            </ul>
            <a name="signals"></a>
            <h2>Signals</h2>
            <p>Appweb responds to the SIGUSR2 signal to toggle the trace level from 2 to 4 and vice-versa. Appweb responds
            to the SIGINFO on Mac OSX and SIGPWR on Unix to emit some operational stats to the trace log.</p>
